home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Tool Chest / Dev.CD Feb 97 TC.toast / Sample Code / Interapplication Communication / MenuScripter 4.0 / Sources / MSAEUtils.h < prev    next >
Encoding:
Text File  |  1996-07-09  |  1.4 KB  |  45 lines  |  [TEXT/CWIE]

  1. // MSAEUtils.h
  2. //
  3. // Original version by Jon Lansdell and Nigel Humphreys.
  4. // 4.0 and 3.1 updates by Greg Sutton.
  5. // ©Apple Computer Inc 1996, all rights reserved.
  6.  
  7. #include <Types.h>
  8. #include <Quickdraw.h>
  9. #include <Packages.h>
  10. #include <GestaltEqu.h>
  11. #include <Editions.h>
  12. #include <Printing.h>
  13. #include <AppleEvents.h>
  14. #include <ToolUtils.h>
  15.  
  16. #ifndef __MSAEUTILS__
  17. #define __MSAEUTILS__
  18.  
  19. #include "MSToken.h"
  20.  
  21.     // Utility Routines for getting data from AEDesc's
  22.     
  23. void     GetRawDataFromDescriptor(const AEDesc *theDesc, Ptr destPtr,
  24.                                             Size destMaxSize, Size *actSize);
  25.                                                                          
  26. OSErr    GetPStringFromDescriptor(const AEDesc *aDesc, StringPtr resultStr);
  27. OSErr    PutPStringToDescriptor(AEDesc* aDesc, StringPtr pStr);
  28. OSErr    GetIntegerFromDescriptor(const AEDesc *sourceDesc, short *result);
  29. OSErr    GetBooleanFromDescriptor(const AEDesc *sourceDesc, Boolean *result);
  30. OSErr    GetLongIntFromDescriptor(const AEDesc *sourceDesc, long   *result);
  31. OSErr    GetRectFromDescriptor(const AEDesc *sourceDesc, Rect *result);
  32. OSErr    GetPointFromDescriptor(const AEDesc *sourceDesc, Point  *result);
  33. OSErr    GetEnumeratedFromDescriptor(const AEDesc *sourceDesc, DescType  *result);
  34.  
  35.     // Parameter routines
  36.  
  37. OSErr        GotRequiredParams(const AppleEvent *theAppleEvent);
  38. OSErr        AddResultToReply(AEDesc* result, AEDesc* reply, OSErr error);
  39.  
  40.     // Routine so events can be sent to self
  41.  
  42. OSErr        MakeSelfAddress(AEAddressDesc *selfAddress);
  43.  
  44.  
  45. #endif